Add BatchSetUserDONOverride operation for Workflow Registry#22373
Open
ibrajer wants to merge 3 commits into
Open
Add BatchSetUserDONOverride operation for Workflow Registry#22373ibrajer wants to merge 3 commits into
ibrajer wants to merge 3 commits into
Conversation
Contributor
|
✅ No conflicts with other open PRs targeting |
Contributor
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM
Adds a batched “set user DON override” operation/changeset for Workflow Registry v2 so multiple overrides can be applied as a single MCMS BatchOperation (or executed directly without MCMS), plus a small refactor to reduce repeated setup/teardown boilerplate in the configure changeset.
Changes:
- Introduces
BatchSetUserDONOverrideOpthat aggregates NsetUserDONOverridecalls into one MCMS batch (or confirms them sequentially on-chain when not using MCMS). - Adds
BatchSetUserDONOverridechangeset + input validation for override lists (non-empty, non-zero user, non-empty family, no duplicates). - Refactors common changeset setup/output logic via
prepareWorkflowRegistryDepsandfinalizeWorkflowRegistryOutput, and adds tests for the new batched changeset.
Scrupulous human review recommended (high impact areas):
BatchSetUserDONOverrideOpMCMS transaction construction (chain selector correctness; calldata/tx targeting; behavior when deps are partially populated).- Any behavior changes from bypassing the strategy abstraction for the batched path (esp. how tx opts are constructed and how failures/partial application are handled in non-MCMS mode).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| deployment/cre/workflow_registry/v2/changeset/operations/contracts/configure_workflow_registry_ops.go | Adds the new batch operation and extends op deps to optionally include an EVM chain for direct calldata/confirm flows. |
| deployment/cre/workflow_registry/v2/changeset/configure_workflow_registry.go | Adds batch changeset and refactors common deps/proposal-building boilerplate into helper functions. |
| deployment/cre/workflow_registry/v2/changeset/configure_workflow_registry_test.go | Adds unit/integration-style tests for batch preconditions and MCMS/non-MCMS behavior invariants. |
Comment on lines
+347
to
+359
| mtx, err := cldfproposalutils.TransactionForChain(input.ChainSelector, deps.Registry.Address().Hex(), tx.Data(), big.NewInt(0), "", nil) | ||
| if err != nil { | ||
| return BatchSetUserDONOverrideOpOutput{}, fmt.Errorf("failed to build MCMS transaction for %s: %w", entry.User.Hex(), err) | ||
| } | ||
| mcmsTxs = append(mcmsTxs, mtx) | ||
| } | ||
|
|
||
| var mergedOp *mcmstypes.BatchOperation | ||
| if input.MCMSConfig != nil { | ||
| mergedOp = &mcmstypes.BatchOperation{ | ||
| ChainSelector: mcmstypes.ChainSelector(input.ChainSelector), | ||
| Transactions: mcmsTxs, | ||
| } |
Comment on lines
+319
to
+330
| if len(input.Overrides) == 0 { | ||
| return BatchSetUserDONOverrideOpOutput{}, errors.New("must provide at least one override") | ||
| } | ||
| if deps.Chain == nil { | ||
| return BatchSetUserDONOverrideOpOutput{}, errors.New("deps.Chain is required for BatchSetUserDONOverrideOp") | ||
| } | ||
|
|
||
| // MCMS path uses simulated tx opts to produce calldata without sending; non-MCMS uses the deployer key. | ||
| txOpts := deps.Chain.DeployerKey | ||
| if input.MCMSConfig != nil { | ||
| txOpts = cldf.SimTransactOpts() | ||
| } |
|
anirudhwarrier
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Requires
Supports